package com.xxxcompany.world.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.xxxcompany.world.dao.IWorldDAO;
import com.xxxcompany.world.dao.impl.WorldDAOImpl;
import com.xxxcompany.world.entity.City;
import com.xxxcompany.world.entity.Country;
import com.xxxcompany.world.service.IWorldService;

public class WorldServiceImpl implements IWorldService {

	IWorldDAO wDAO = new WorldDAOImpl();

	@Override
	public List<Country> findAllCountry() {
		// TODO Auto-generated method stub
		try {
			return wDAO.findAllCountry();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public List<City> findAllCity() {
		// TODO Auto-generated method stub
		try {
			return wDAO.findAllCity();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Country findCountry(String countryname) {
		// TODO Auto-generated method stub
		try {
			return wDAO.findCountry(countryname);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public List<City> findCountryCity(String countryname) {
		// TODO Auto-generated method stub
		try {
			return wDAO.findCountryCity(countryname);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
